package net.dipper.tankwar.game.control;

import wnb.util.control.CommandEngine;
import net.dipper.tankwar.core.data.ObjectMap;
import net.dipper.tankwar.game.ui.GameContext;

/*游戏运行系统*/
public class GameRule {
	public static final byte RESULT_FAIL = 0;
	public static final byte RESULT_CONTINUE = 1;
	public static final byte RESULT_SUCCESS = 2;
	private GameRuleCommand command;
	private GameContext context;
	private ObjectMap map;
	
	public GameRule(GameContext context, ObjectMap map, CommandEngine engine){
		this.map = map;
		this.context = context;
		this.command = new GameRuleCommand(context, this.map, engine);
	}

	//开始运行
	public void start() {
		context.pushCommand(this.command);
	}
}
